package xyz.zdsoft.project_group_manage_module.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.RespPageBean;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.SelTeamBean;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.TeamGch;
import xyz.zdsoft.project_group_manage_module.mapper.TermSelStudentNotInTeamMapper;

import javax.annotation.Resource;

@Service
public class TermSelStudentNotInTeamService {
    @Resource
    private TermSelStudentNotInTeamMapper termSelStudentNotInTeamMapper;

    public RespPageBean SelStudentNotInTeam(Integer currentPage, Integer size, SelTeamBean selTeamBean){
        Page<TeamGch> page=new Page<>(currentPage,size);
        IPage<TeamGch> teamNotStudent =termSelStudentNotInTeamMapper.TermSelStudentHaveTeam(page,selTeamBean);
        return new RespPageBean(teamNotStudent.getTotal(),teamNotStudent.getRecords());
    }
}
